<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.jsp.bean.RentcarBean" %>
<%@ page import="com.jsp.dao.RentcarDao" %>
<%@ page import="com.jsp.util.DBUtil" %>
<%@ page import="java.sql.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'shenhe.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  <style> 
  td  
   {  
    text-align:center;  
   }  
  </style>

  </head>
  
  <body background="images/picture_5.jpg">
    <div class="officialcar">
      <center><h1>欢迎进入管理员系统</h1>
      <p>审核申请信息</p><br/>
     <table border="1" cellpadding="2" cellspacing="0">
      <tr>
         <td><b>申请号</b></td>
         <td><b>申请人</b></td>
         <td><b>申请时间</b></td>
         <td><b>归还时间</b></td>
         <td><b>原因</b></td>
         <td><b>申请车辆</b></td>
         <td><b>申请司机</b></td> 
         <td><b>审核意见</b></td>
         <td><b></b></td>
     </tr> 
      <%
        int startPage = 0;
        int diePage = 100;  
        List <RentcarBean> list = new ArrayList <RentcarBean>();
        Connection con = DBUtil.getConnection();
        String sql = "select * from rentcarinformation order by id asc limit ?,?";
        PreparedStatement state = con.prepareStatement(sql);
		state.setInt(1,startPage);
		state.setInt(2,diePage);
        ResultSet rs = state.executeQuery(); 
        while(rs.next()){
       %> 
        <tr>           
            <form action="RentcarServlet?mark=update" method="post">
            <td><input type="text" name="id" value=<%=rs.getString("id") %>></td>
            <td><input type="text" name="apply_name" value=<%=rs.getString("apply_name") %>></td>
            <td><input type="text" name="openTime" value=<%=rs.getString("openTime") %>></td>
            <td><input type="text" name="returnTime" value=<%=rs.getString("returnTime") %>></td>
            <td><input type="text" name="reason" value=<%=rs.getString("reason") %>></td>
            <td><input type="text" name="apply_car" value=<%=rs.getString("apply_car") %>></td>
            <td><input type="text" name="apply_driver" value=<%=rs.getString("apply_driver") %>></td>
            <td><select name="opinion"><option value="不同意">不同意</option><option value="同意">同意</option></select></td>            
            <td><input type="submit" name="update" value="更新"></td> 
            </form>
        </tr>                     
          <%} 
            state.close();
            con.close();
           %> 
    </table>
    </div> 
    <br>
    <br>
    <div>
    <center>
        <a href="admin/deleteshenhe.jsp"><input name="commit" type="submit" id="delete" value="删除"></a>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        <a href="adminmain.jsp"><input name="commit1" type="submit" id="back" value="返回"></a>           
   </div>     
  </body>
</html>
